package com.example.designPattern.Proxy.JDKDynamicProxy;


import com.example.designPattern.Proxy.IStar;
import com.example.designPattern.Proxy.RealStar;


public class ProxyTest {
    public static void main(String[] args) {
        //JDK动态代理的实现原理
        IStar obj = null;
        try {
            obj = (IStar) new StarCompany().getInstance(new RealStar());
            System.out.println(obj.getClass());
             obj.confer();

           // obj.sing();

            //obj.collectMoney();

        } catch (Exception e) {
            e.printStackTrace();
        }

    }
}
